package com.kgis.map.events {
    import com.kgis.map.feature.Feature;
    import com.kgis.map.handler.feature.draw.AnchorPoint;

    import flash.events.Event;

    import mx.collections.ArrayCollection;
    import com.kgis.map.events.EventBase;

    public class EditEvent extends EventBase {


        /**
         * 设施编辑状态中显示的锚点
         * */
        public var anchorPoint:AnchorPoint;
        /**
         * 正在编辑的设施
         * */
        public var editFeature:Feature;
        /**
         * 正在编辑的设施列表
         * */
        public var editFeatures:ArrayCollection;

        public static const ANCHORPOINT_DOWN:String = "pkmap.anchorpoint.down";
        public static const ANCHORPOINT_UP:String = "pkmap.anchorpoint.up";
        /**
         * 几何图形编辑结束
         * */
        public static const GEOMETRY_EDITEND:String = "pkmap.feature.edit.geometryEnd";
        /**
         *
         * */
        public static const GRAPHICS_MOVE:String = "pkmap.feature.edit.graphicMove";
        /**
         * 设施第一次移动事件
         * */
        public static const GRAPHICS_MOVE_FIRST:String = "pkmap.feature.edit.graphicMoveFirst";
        /**
         * 开始移动
         * */
        public static const GRAPHICS_MOVE_START:String = "pkmap.feature.edit.graphicMoveStart";
        /**
         * 移动结束
         * */
        public static const GRAPHICS_MOVE_STOP:String = "pkmap.feature.edit.graphicMoveStop";
        /**
         * 增加节点
         * */
        public static const VERTEX_ADD:String = "pkmap.feature.edit.vertexAdd";
        /**
         * 删除节点
         * */
        public static const VERTEX_DELETE:String = "pkmap.feature.edit.vertexDelete";
        /**
         * 鼠标移出节点
         * */
        public static const VERTEX_MOUSE_OUT:String = "pkmap.feature.edit.vertexMouseOut";
        /**
         * 鼠标移到节点上
         * */
        public static const VERTEX_MOUSE_OVER:String = "pkmap.feature.edit.vertexMouseOver";
        /**
         * 节点拖动事件
         * */
        public static const VERTEX_MOVE:String = "pkmap.feature.edit.vertexMove";
        /**
         * 节点开始拖动
         * */
        public static const VERTEX_MOVE_START:String = "pkmap.feature.edit.vertexMoveStart";
        /**
         *
         * 节点移动结束
         * */
        public static const VERTEX_MOVE_STOP:String = "pkmap.feature.edit.vertexMoveStop";

        /**
         *
         * 删除设施结束
         * */
        public static const FEATURE_DELETED:String = "pkmap.feature.edit.deletefeature";


        public function EditEvent(type:String, feature:Feature = null, anchor:AnchorPoint = null, features:ArrayCollection = null, bubbles:Boolean = false, cancelable:Boolean = false) {
            super(type, bubbles, cancelable);
            anchorPoint = anchor;
            this.editFeature = feature;
            this.editFeatures = features;
        }

        override public function clone():Event {
            return this;
        }


    }
}

